<?php

namespace App\Models\Common;

use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;

class FsOrganizationModel extends BaseModel
{
    use KfSoftDeletes;

    public $timestamps = false;

    protected $table = 'fs_organizations';

    protected $fillable = [
        'name',
        'apiConfig',
        'remark',
    ];

    public static function getApiConfig(int $id): ?array
    {
        return json_decode(self::query()->where('id', $id)->value('apiConfig'), true);
    }
}
